<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>slot</title>
    <script type="text/javascript" src="../assets/js/vue-2.3.0.js"></script>
    <script type="text/javascript" src="../assets/js/jquery.js"></script>
</head>
<body>
    <h1>内置组件slot</h1>
    <hr>
    <div id="app">
        <wukong>
            <div slot="home">{{wukongDate.home}}</div>
            <div slot="teacher">{{wukongDate.teacher}}</div>
        </wukong>
    </div>
    <template id="tmp">
        <div>
            <span>家乡：<slot name="home"></slot></span>
            <span>师傅：<slot name="teacher"></slot></span>
        </div>
    </template>
</body>
<script type="text/javascript">
    var wukong = {
        template:'#tmp'
    }
    var app = new Vue({
        el:'#app',
        data:{
            wukongDate:{
                home:'huaguoshan',
                teacher:'Tang Monk'
            }
        },
        components:{
            'wukong':wukong
        }
    })
    
</script>
</html>